package cn.nxcoder.jmw.mq.activemq;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.stereotype.Component;

/**
 * @author xiaqing
 */
@Component
public class QueueConsumer2 {
    private static final Logger LOG = LoggerFactory.getLogger(QueueConsumer2.class);

    @JmsListener(destination = "test.queue")
    @SendTo("out.queue")
    public String receiveQueue(String msg) {
        LOG.info("Queue-Consumer2 收到的消息为: {}", msg);
        return "return msg: " + msg;
    }
}
